package cn.stylefeng.guns.modular.rest;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.sht.entity.QuestionBank;
import cn.stylefeng.guns.modular.sht.model.params.QuestionBankParam;
import cn.stylefeng.guns.modular.sht.service.QuestionBankService;
import cn.stylefeng.roses.core.base.controller.BaseController;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;


/**
 * 题库信息控制器
 *
 * @author
 * @Date 2021-01-22 20:22:52
 */
@RestController
@RequestMapping("/miniprogramApi/questionBank")
public class ApiQuestionBankController extends BaseController {

    @Autowired
    private QuestionBankService questionBankService;

    /**
     * 查询列表
     *
     * @author
     * @Date 2021-01-22
     */
    @ResponseBody
    @RequestMapping("/list")
    public ResponseData list() {
        return ResponseData.success(this.questionBankService.list(new QueryWrapper<QuestionBank>().orderByAsc("sort")));
    }

}


